import { IsEmail, IsMobilePhone, IsNotEmpty, IsOptional, IsString, MaxLength, MinLength } from 'class-validator'

export class RegisterUserDto {
  @IsString({ message: 'account 类型错误，正确类型 string' })
  @IsNotEmpty({ message: 'account 不能为空' })
  readonly name: string

  @IsString({ message: 'password 类型错误，正确类型 string' })
  @IsNotEmpty({ message: 'password 不能为空' })
  password: string

  @IsString({ message: 'email 类型错误，正确类型 string' })
  @IsEmail()
  @IsOptional()
  @IsNotEmpty({ message: 'email 不能为空' })
  readonly email?: string

  @IsString({ message: ' confirmPassword 类型错误，正确类型 string' })
  readonly confirmPassword: string

  @IsString({ message: 'avatar 类型错误，正确类型 string' })
  @IsOptional()
  @IsNotEmpty({ message: 'desc 不能为空' })
  readonly desc?: string
}